/**
 * 页签操作封装
 * @author linyn
 * @date 2025/10/24 17:13
 */
import router from "@/router";

// const HOME_ROUTE = HOME_PATH || LAYOUT_PATH;

/**
 * 登录成功后跳转首页
 * @param from 登录前的地址
 */
export async function goHomeRoute(from: any) {
  // 确保 from 是有效的路径，否则跳转到首页
  const targetPath = from && from !== "/" ? from : "/home";
  await router.replace(targetPath);
}
